<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
  <meta name="theme-color" content="#222">
  <meta name="generator" content="Hexo 5.4.0">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

  <link rel="stylesheet" href="/css/main.css">



  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.2/css/all.min.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.1.1/animate.min.css">

  <script class="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {
      "hostname": "holidaypenguin.gitee.io",
      "root": "/",
      "images": "/images",
      "scheme": "Mist",
      "version": "8.2.2",
      "exturl": false,
      "sidebar": {
        "position": "right",
        "display": "always",
        "padding": 18,
        "offset": 12
      },
      "copycode": true,
      "bookmark": {
        "enable": false,
        "color": "#222",
        "save": "auto"
      },
      "fancybox": false,
      "mediumzoom": false,
      "lazyload": false,
      "pangu": false,
      "comments": {
        "style": "tabs",
        "active": null,
        "storage": true,
        "lazyload": false,
        "nav": null
      },
      "motion": {
        "enable": true,
        "async": true,
        "transition": {
          "post_block": "fadeIn",
          "post_header": "fadeInDown",
          "post_body": "fadeInDown",
          "coll_header": "fadeInLeft",
          "sidebar": "slideUpIn"
        }
      },
      "prism": false,
      "i18n": {
        "placeholder": "搜索...",
        "empty": "没有找到任何搜索结果：${query}",
        "hits_time": "找到 ${hits} 个搜索结果（用时 ${time} 毫秒）",
        "hits": "找到 ${hits} 个搜索结果"
      },
      "path": "/search.xml",
      "localsearch": {
        "enable": true,
        "trigger": "auto",
        "top_n_per_article": 1,
        "unescape": false,
        "preload": false
      }
    };
  </script>
  <meta property="og:type" content="article">
  <meta property="og:title" content="IDE-Sublime Package Control">
  <meta property="og:url" content="https://holidaypenguin.gitee.io/blob/2016-03-17-ide-sublime-package-control/index.html">
  <meta property="og:site_name" content="HolidayPenguin">
  <meta property="og:locale" content="zh_CN">
  <meta property="og:image" content="https://holidaypenguin.gitee.io/images/sublime/03.png">
  <meta property="og:image" content="https://holidaypenguin.gitee.io/images/FrontEnd/0007.png">
  <meta property="article:published_time" content="2016-03-17T06:38:19.000Z">
  <meta property="article:modified_time" content="2016-03-17T06:38:19.000Z">
  <meta property="article:author" content="holidaypenguin">
  <meta property="article:tag" content="IDE">
  <meta property="article:tag" content="Sublime">
  <meta property="article:tag" content="工具">
  <meta name="twitter:card" content="summary">
  <meta name="twitter:image" content="https://holidaypenguin.gitee.io/images/sublime/03.png">


  <link rel="canonical" href="https://holidaypenguin.gitee.io/blob/2016-03-17-ide-sublime-package-control/">


  <script class="page-configurations">
    // https://hexo.io/docs/variables.html
    CONFIG.page = {
      sidebar: "",
      isHome: false,
      isPost: true,
      lang: 'zh-CN'
    };
  </script>
  <title>IDE-Sublime Package Control | HolidayPenguin</title>





  <noscript>
    <style>
      body {
        margin-top: 2rem;
      }

      .use-motion .menu-item,
      .use-motion .sidebar,
      .use-motion .post-block,
      .use-motion .pagination,
      .use-motion .comments,
      .use-motion .post-header,
      .use-motion .post-body,
      .use-motion .collection-header {
        visibility: visible;
      }

      .use-motion .header,
      .use-motion .site-brand-container .toggle,
      .use-motion .footer {
        opacity: initial;
      }

      .use-motion .site-title,
      .use-motion .site-subtitle,
      .use-motion .custom-logo-image {
        opacity: initial;
        top: initial;
      }

      .use-motion .logo-line {
        transform: scaleX(1);
      }

      .search-pop-overlay,
      .sidebar-nav {
        display: none;
      }

      .sidebar-panel {
        display: block;
      }
    </style>
  </noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner">
        <div class="site-brand-container">
          <div class="site-nav-toggle">
            <div class="toggle" aria-label="切换导航栏" role="button">
              <span class="toggle-line"></span>
              <span class="toggle-line"></span>
              <span class="toggle-line"></span>
            </div>
          </div>

          <div class="site-meta">

            <a href="/" class="brand" rel="start">
              <i class="logo-line"></i>
              <h1 class="site-title">HolidayPenguin</h1>
              <i class="logo-line"></i>
            </a>
          </div>

          <div class="site-nav-right">
            <div class="toggle popup-trigger">
              <i class="fa fa-search fa-fw fa-lg"></i>
            </div>
          </div>
        </div>



        <nav class="site-nav">
          <ul class="main-menu menu">
            <li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a></li>
            <li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a></li>
            <li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a></li>
            <li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a></li>
            <li class="menu-item menu-item-search">
              <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
              </a>
            </li>
          </ul>
        </nav>



        <div class="search-pop-overlay">
          <div class="popup search-popup">
            <div class="search-header">
              <span class="search-icon">
                <i class="fa fa-search"></i>
              </span>
              <div class="search-input-container">
                <input autocomplete="off" autocapitalize="off" maxlength="80" placeholder="搜索..." spellcheck="false" type="search" class="search-input">
              </div>
              <span class="popup-btn-close" role="button">
                <i class="fa fa-times-circle"></i>
              </span>
            </div>
            <div class="search-result-container no-result">
              <div class="search-result-icon">
                <i class="fa fa-spinner fa-pulse fa-5x"></i>
              </div>
            </div>

          </div>
        </div>

      </div>


      <div class="toggle sidebar-toggle" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
      </div>

      <aside class="sidebar">

        <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
          <ul class="sidebar-nav">
            <li class="sidebar-nav-toc">
              文章目录
            </li>
            <li class="sidebar-nav-overview">
              站点概览
            </li>
          </ul>

          <div class="sidebar-panel-container">
            <!--noindex-->
            <div class="post-toc-wrap sidebar-panel">
              <div class="post-toc animated">
                <ol class="nav">
                  <li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BB%A3%E7%A0%81%E5%BF%AB%E9%80%9F%E7%94%9F%E6%88%90%E5%99%A8"><span class="nav-number">1.</span> <span class="nav-text">代码快速生成器</span></a></li>
                  <li class="nav-item nav-level-2"><a class="nav-link" href="#javascript-%E5%BF%AB%E9%80%9F%E6%8F%90%E7%A4%BA"><span class="nav-number">2.</span> <span class="nav-text">javascript 快速提示</span></a></li>
                  <li class="nav-item nav-level-2"><a class="nav-link" href="#jquery%E5%BF%AB%E9%80%9F%E6%8F%90%E7%A4%BA"><span class="nav-number">3.</span> <span class="nav-text">jquery快速提示</span></a></li>
                  <li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%BF%AB%E9%80%9F%E7%94%9F%E6%88%90%E5%9B%9E%E6%8E%89%E5%87%BD%E6%95%B0"><span class="nav-number">4.</span> <span class="nav-text">快速生成回掉函数</span></a></li>
                  <li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%BF%AB%E9%80%9F%E5%88%9B%E5%BB%BA%E6%96%87%E4%BB%B6"><span class="nav-number">5.</span> <span class="nav-text">快速创建文件</span></a></li>
                  <li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%B5%8B%E8%AF%95%E8%AF%B7%E6%B1%82"><span class="nav-number">6.</span> <span class="nav-text">测试请求</span></a></li>
                  <li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%AF%8F%E6%AC%A1%E7%BC%96%E7%A0%81%E9%9C%80%E8%A6%81%E5%85%AC%E5%85%B1%E7%BB%84%E4%BB%B6%EF%BC%8C%E5%9B%A0%E6%AD%A4%E5%8F%AF%E4%BB%A5%E4%BB%8E%E4%B8%80%E4%B8%AA%E5%85%AC%E5%85%B1%E9%85%8D%E7%BD%AE%E4%B8%AD%E4%B8%8B%E8%BD%BD"><span class="nav-number">7.</span> <span class="nav-text">每次编码需要公共组件，因此可以从一个公共配置中下载</span></a></li>
                  <li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%B7%BB%E5%8A%A0sidebar%E5%8F%B3%E9%94%AE%E5%8A%9F%E8%83%BD"><span class="nav-number">8.</span> <span class="nav-text">添加sidebar右键功能</span></a></li>
                  <li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%94%9F%E6%88%90%E6%96%87%E4%BB%B6%E5%A4%B4%E9%83%A8%E6%B3%A8%E9%87%8A"><span class="nav-number">9.</span> <span class="nav-text">生成文件头部注释</span></a></li>
                  <li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%B7%BB%E5%8A%A0%E6%B3%A8%E9%87%8A%E4%BB%A3%E7%A0%81"><span class="nav-number">10.</span> <span class="nav-text">添加注释代码</span></a></li>
                  <li class="nav-item nav-level-2"><a class="nav-link" href="#%E8%AF%AD%E6%B3%95%E6%A0%A1%E9%AA%8C"><span class="nav-number">11.</span> <span class="nav-text">语法校验</span></a></li>
                  <li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%88%87%E6%8D%A2%E8%AF%AD%E8%A8%80"><span class="nav-number">12.</span> <span class="nav-text">切换语言</span></a></li>
                  <li class="nav-item nav-level-2"><a class="nav-link" href="#HTML-CSS-JAVASCRIPT-JSON%E5%BF%AB%E9%80%9F%E6%A0%BC%E5%BC%8F%E5%8C%96"><span class="nav-number">13.</span> <span class="nav-text">HTML+CSS+JAVASCRIPT+JSON快速格式化</span></a></li>
                  <li class="nav-item nav-level-2"><a class="nav-link" href="#CSS2REM"><span class="nav-number">14.</span> <span class="nav-text">CSS2REM</span></a>
                    <ol class="nav-child">
                      <li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%AE%89%E8%A3%85"><span class="nav-number">14.1.</span> <span class="nav-text">安装</span></a></li>
                      <li class="nav-item nav-level-3"><a class="nav-link" href="#%E9%85%8D%E7%BD%AE%E5%8F%82%E6%95%B0"><span class="nav-number">14.2.</span> <span class="nav-text">配置参数</span></a></li>
                    </ol>
                  </li>
                  <li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%89%93%E5%BC%80CMD"><span class="nav-number">15.</span> <span class="nav-text">打开CMD</span></a></li>
                  <li class="nav-item nav-level-2"><a class="nav-link" href="#Less"><span class="nav-number">16.</span> <span class="nav-text">Less</span></a></li>
                  <li class="nav-item nav-level-2"><a class="nav-link" href="#emmet-%E6%8F%92%E4%BB%B6"><span class="nav-number">17.</span> <span class="nav-text">emmet 插件</span></a></li>
                </ol>
              </div>
            </div>
            <!--/noindex-->

            <div class="site-overview-wrap sidebar-panel">
              <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
                <p class="site-author-name" itemprop="name">holidaypenguin</p>
                <div class="site-description" itemprop="description"></div>
              </div>
              <div class="site-state-wrap site-overview-item animated">
                <nav class="site-state">
                  <div class="site-state-item site-state-posts">
                    <a href="/archives/">

                      <span class="site-state-item-count">138</span>
                      <span class="site-state-item-name">日志</span>
                    </a>
                  </div>
                  <div class="site-state-item site-state-categories">
                    <a href="/categories/">

                      <span class="site-state-item-count">26</span>
                      <span class="site-state-item-name">分类</span></a>
                  </div>
                  <div class="site-state-item site-state-tags">
                    <a href="/tags/">

                      <span class="site-state-item-count">234</span>
                      <span class="site-state-item-name">标签</span></a>
                  </div>
                </nav>
              </div>
              <div class="links-of-author site-overview-item animated">
                <span class="links-of-author-item">
                  <a href="https://github.com/holidaypenguin" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;holidaypenguin" rel="noopener" target="_blank"><i class="github fa-fw"></i>GitHub</a>
                </span>
                <span class="links-of-author-item">
                  <a href="mailto:songshipeng2016@gmail.com" title="E-Mail → mailto:songshipeng2016@gmail.com" rel="noopener" target="_blank"><i class="envelope fa-fw"></i>E-Mail</a>
                </span>
              </div>



            </div>
          </div>
        </div>
      </aside>
      <div class="sidebar-dimmer"></div>


    </header>


    <div class="back-to-top" role="button">
      <i class="fa fa-arrow-up"></i>
      <span>0%</span>
    </div>

    <noscript>
      <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
    </noscript>


    <div class="main-inner post posts-expand">





      <div class="post-block">



        <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
          <link itemprop="mainEntityOfPage" href="https://holidaypenguin.gitee.io/blob/2016-03-17-ide-sublime-package-control/">

          <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
            <meta itemprop="image" content="/images/avatar.gif">
            <meta itemprop="name" content="holidaypenguin">
            <meta itemprop="description" content="">
          </span>

          <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
            <meta itemprop="name" content="HolidayPenguin">
          </span>
          <header class="post-header">
            <h1 class="post-title" itemprop="name headline">
              IDE-Sublime Package Control
            </h1>

            <div class="post-meta-container">
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>

                  <time title="创建时间：2016-03-17 14:38:19" itemprop="dateCreated datePublished" datetime="2016-03-17T14:38:19+08:00">2016-03-17</time>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-folder"></i>
                  </span>
                  <span class="post-meta-item-text">分类于</span>
                  <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                    <a href="/categories/IDE/" itemprop="url" rel="index"><span itemprop="name">IDE</span></a>
                  </span>
                </span>


                <span id="/blob/2016-03-17-ide-sublime-package-control/" class="post-meta-item leancloud_visitors" data-flag-title="IDE-Sublime Package Control" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
              </div>

              <div class="post-description">
                <!-- more -->
              </div>
            </div>
          </header>




          <div class="post-body" itemprop="articleBody">
            <p>查看可使用的插件：<a target="_blank" rel="noopener" href="https://packagecontrol.io/">https://packagecontrol.io/</a><br>Ctrl + Shift + P、pcip、</p>
            <h2 id="代码快速生成器"><a href="#代码快速生成器" class="headerlink" title="代码快速生成器"></a>代码快速生成器</h2>
            <p>emmet、emmet css snippets</p>
            <table>
              <thead>
                <tr>
                  <th>-</th>
                  <th>-</th>
                  <th>-</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td>快速生成简单页面</td>
                  <td>!，Ctrl + E</td>
                  <td>该方法是emmet快捷键，分两步完成</td>
                </tr>
                <tr>
                  <td><img src="" data-original="/images/sublime/03.png" alt="03"></td>
                  <td>ul&gt;.item$*10</td>
                  <td>&gt;：子元素选择符<br>.item：子元素是item开头<br>$：代表序号<br>*10：输入10个带有class=”item123….10”</td>
                </tr>
                <tr>
                  <td></td>
                  <td>扩展，很酷</td>
                  <td>div#s.d&gt;div#e.s&gt;span.em*5&gt;span.im$*5</td>
                </tr>
              </tbody>
            </table>
            <p><a target="_blank" rel="noopener" href="http://emmet.io/">http://emmet.io/</a><br><a target="_blank" rel="noopener" href="https://github.com/sergeche/emmet-sublime">https://github.com/sergeche/emmet-sublime</a><br><a target="_blank" rel="noopener" href="https://github.com/sergeche/emmet-sublime#tab-key-handler">https://github.com/sergeche/emmet-sublime#tab-key-handler</a></p>
            <h2 id="javascript-快速提示"><a href="#javascript-快速提示" class="headerlink" title="javascript 快速提示"></a>javascript 快速提示</h2>
            <pre><code>javascript snippet/Completions
</code></pre>
            <h2 id="jquery快速提示"><a href="#jquery快速提示" class="headerlink" title="jquery快速提示"></a>jquery快速提示</h2>
            <pre><code>jquery
</code></pre>
            <h2 id="快速生成回掉函数"><a href="#快速生成回掉函数" class="headerlink" title="快速生成回掉函数"></a>快速生成回掉函数</h2>
            <pre><code>`insert callback`  
</code></pre>
            <p><a target="_blank" rel="noopener" href="https://packagecontrol.io/packages/Insert%20Callback">https://packagecontrol.io/packages/Insert%20Callback</a><br> Press <code>Alt+C</code>. If the function call’s trailing semicolon is missing, it will be filled in. A callback function snippet will then be inserted.</p>
            <figure class="highlight plain">
              <table>
                <tr>
                  <td class="gutter">
                    <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre>
                  </td>
                  <td class="code">
                    <pre><span class="line">someAsyncFn(function(err, d) &#123;</span><br><span class="line"></span><br><span class="line">&#125;);</span><br></pre>
                  </td>
                </tr>
              </table>
            </figure>


            <h2 id="快速创建文件"><a href="#快速创建文件" class="headerlink" title="快速创建文件"></a>快速创建文件</h2>
            <pre><code>advancedNewFile 
</code></pre>
            <p><a target="_blank" rel="noopener" href="https://packagecontrol.io/packages/AdvancedNewFile">https://packagecontrol.io/packages/AdvancedNewFile</a><br><a target="_blank" rel="noopener" href="https://github.com/skuroda/Sublime-AdvancedNewFile">https://github.com/skuroda/Sublime-AdvancedNewFile</a><br>ctrl+alt+n: General keymap to create new files.<br>ctrl+shift+alt+n: In addition to creating the folders specified, new folders will also contain an <strong>init</strong>.py file.</p>
            <h2 id="测试请求"><a href="#测试请求" class="headerlink" title="测试请求"></a>测试请求</h2>
            <pre><code>Http Requester
</code></pre>
            <p><a target="_blank" rel="noopener" href="https://packagecontrol.io/packages/Http%20Requester">https://packagecontrol.io/packages/Http%20Requester</a><br>Alt + Ctrl + R 快速访问选中文字的链接<br>get 请求和 post请求方式不同<br>POST <a target="_blank" rel="noopener" href="http://posttestserver.com/post.php">http://posttestserver.com/post.php</a><br>Content-type: application/x-www-form-urlencoded<br>POST_BODY:<br>variable1=avalue&amp;variable2=1234&amp;variable3=anothervalue<br>GET <a target="_blank" rel="noopener" href="http://www.google.com/search?q=test">http://www.google.com/search?q=test</a></p>
            <h2 id="每次编码需要公共组件，因此可以从一个公共配置中下载"><a href="#每次编码需要公共组件，因此可以从一个公共配置中下载" class="headerlink" title="每次编码需要公共组件，因此可以从一个公共配置中下载"></a>每次编码需要公共组件，因此可以从一个公共配置中下载</h2>
            <pre><code>Nettuts+ Fetch
</code></pre>
            <p><a target="_blank" rel="noopener" href="https://packagecontrol.io/packages/Nettuts%2B%20Fetch">https://packagecontrol.io/packages/Nettuts%2B%20Fetch</a><br>Ctrl + Shift + P<br>fetch: file 下载选择文件内容<br>fetch: manage 管理配置文件类库<br>fetch: package</p>
            <h2 id="添加sidebar右键功能"><a href="#添加sidebar右键功能" class="headerlink" title="添加sidebar右键功能"></a>添加sidebar右键功能</h2>
            <pre><code>Side​Bar​Enhancements
</code></pre>
            <p><a target="_blank" rel="noopener" href="https://packagecontrol.io/packages/SideBarEnhancements">https://packagecontrol.io/packages/SideBarEnhancements</a></p>
            <h2 id="生成文件头部注释"><a href="#生成文件头部注释" class="headerlink" title="生成文件头部注释"></a>生成文件头部注释</h2>
            <p>FileHeader<br><a target="_blank" rel="noopener" href="https://packagecontrol.io/packages/FileHeader">https://packagecontrol.io/packages/FileHeader</a></p>
            <h2 id="添加注释代码"><a href="#添加注释代码" class="headerlink" title="添加注释代码"></a>添加注释代码</h2>
            <pre><code>Doc​Blockr
</code></pre>
            <p><a target="_blank" rel="noopener" href="https://packagecontrol.io/packages/DocBlockr">https://packagecontrol.io/packages/DocBlockr</a></p>
            <h2 id="语法校验"><a href="#语法校验" class="headerlink" title="语法校验"></a>语法校验</h2>
            <pre><code>Sublime​Linter
</code></pre>
            <p><a target="_blank" rel="noopener" href="https://packagecontrol.io/packages/SublimeLinter">https://packagecontrol.io/packages/SublimeLinter</a></p>
            <pre><code>SublimeLinter-jshint
</code></pre>
            <p><a target="_blank" rel="noopener" href="https://packagecontrol.io/packages/SublimeLinter-jshint">https://packagecontrol.io/packages/SublimeLinter-jshint</a></p>
            <p>npm i -g jshint</p>
            <pre><code>SublimeLinter-csslint
</code></pre>
            <p><a target="_blank" rel="noopener" href="https://packagecontrol.io/packages/SublimeLinter-csslint">https://packagecontrol.io/packages/SublimeLinter-csslint</a></p>
            <p>npm i -g csslint</p>
            <p>可校验js代码编写过程中不规范的地方，因为有缓存不会实时显示<br>在项目根目录下创建.jshintrc文件，文件以json格式保存，可以有哪些设置，在下面这个网站<br><a target="_blank" rel="noopener" href="http://jshint.com/docs/options/">http://jshint.com/docs/options/</a><br><a target="_blank" rel="noopener" href="http://sublimelinter.readthedocs.org/en/latest/about.html">http://sublimelinter.readthedocs.org/en/latest/about.html</a><br>例如：<br> {<br> “eqeqeq”: true, // true: Require triple equals (===) for comparison<br> }<br>使用同一个配置，配置如下<br>文件：SublimeLinter.sublime-settings</p>
            <figure class="highlight plain">
              <table>
                <tr>
                  <td class="gutter">
                    <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre>
                  </td>
                  <td class="code">
                    <pre><span class="line">&#123;</span><br><span class="line">    &quot;user&quot;: &#123;</span><br><span class="line">        &quot;debug&quot;: false,</span><br><span class="line">        &quot;delay&quot;: 0.25,</span><br><span class="line">        &quot;error_color&quot;: &quot;D02000&quot;,</span><br><span class="line">        &quot;gutter_theme&quot;: &quot;Packages&#x2F;SublimeLinter&#x2F;gutter-themes&#x2F;Default&#x2F;Default.gutter-theme&quot;,</span><br><span class="line">        &quot;gutter_theme_excludes&quot;: [],</span><br><span class="line">        &quot;lint_mode&quot;: &quot;background&quot;,</span><br><span class="line">        &quot;linters&quot;: &#123;</span><br><span class="line"></span><br><span class="line">            &quot;jshint&quot;: &#123;</span><br><span class="line">                &quot;@disable&quot;: false,</span><br><span class="line">                &quot;args&quot;: [</span><br><span class="line">                    &quot;--config&quot;,</span><br><span class="line">                    &quot;D:\\.jshintrc&quot;</span><br><span class="line">                ],</span><br><span class="line">                &quot;excludes&quot;: []</span><br><span class="line">            &#125;,</span><br></pre>
                  </td>
                </tr>
              </table>
            </figure>


            <h2 id="切换语言"><a href="#切换语言" class="headerlink" title="切换语言"></a>切换语言</h2>
            <pre><code>ChineseLocalization
</code></pre>
            <p>切换语言，帮助(H)/Language/简体中文，繁体中文，日本语，English。</p>
            <h2 id="HTML-CSS-JAVASCRIPT-JSON快速格式化"><a href="#HTML-CSS-JAVASCRIPT-JSON快速格式化" class="headerlink" title="HTML+CSS+JAVASCRIPT+JSON快速格式化"></a>HTML+CSS+JAVASCRIPT+JSON快速格式化</h2>
            <pre><code>HTML-CSS-JS Prettify
</code></pre>
            <p><a target="_blank" rel="noopener" href="https://packagecontrol.io/packages/HTML-CSS-JS%20Prettify">https://packagecontrol.io/packages/HTML-CSS-JS%20Prettify</a></p>
            <p>Tools -&gt; Command Palette (Cmd+Shift+P or Ctrl+Shift+P) and type htmlprettify.<br>– or –<br>Ctrl+Shift+H (or Cmd+Shift+H if you’re on a Mac).<br>– or –<br>Right click in the current buffer and select HTML/CSS/JS Prettify -&gt; Prettify Code.<br>安装完运行需要从新设置node路径</p>
            <h2 id="CSS2REM"><a href="#CSS2REM" class="headerlink" title="CSS2REM"></a>CSS2REM</h2>
            <h3 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h3>
            <ul>
              <li>下载本项目，比如：git clone <a target="_blank" rel="noopener" href="https://github.com/flashlizi/cssrem">https://github.com/flashlizi/cssrem</a></li>
              <li>进入packages目录：Sublime Text -&gt; Preferences -&gt; Browse Packages…</li>
              <li>复制下载的cssrem目录到刚才的packges目录里。</li>
              <li>重启Sublime Text。</li>
            </ul>
            <h3 id="配置参数"><a href="#配置参数" class="headerlink" title="配置参数"></a>配置参数</h3>
            <p>参数配置文件：Sublime Text -&gt; Preferences -&gt; Package Settings -&gt; cssrem</p>
            <ul>
              <li>px_to_rem - px转rem的单位比例，默认为40。</li>
              <li>max_rem_fraction_length - px转rem的小数部分的最大长度。默认为6。</li>
              <li>available_file_types - 启用此插件的文件类型。默认为：[“.css”, “.less”, “.sass”]</li>
            </ul>
            <h2 id="打开CMD"><a href="#打开CMD" class="headerlink" title="打开CMD"></a>打开CMD</h2>
            <pre><code>Terminal
</code></pre>
            <p>打开文件的终端，终端默认是CMD。<br>ctrl+shift+t 打开文件所在文件夹，ctrl+shift+alt+t 打开文件所在项目的根目录文件夹，<br>可以自己重新配置快捷键。也可以右键open terminal here打开。</p>
            <h2 id="Less"><a href="#Less" class="headerlink" title="Less"></a>Less</h2>
            <p>Less语法高亮：<br> pci &gt; less &gt; 重启 &gt; less语法高亮</p>
            <p>Less2Css<br><a target="_blank" rel="noopener" href="https://packagecontrol.io/packages/Less2Css">https://packagecontrol.io/packages/Less2Css</a><br>npm install less -gd<br>npm install -g less-plugin-clean-css<br>npm install -g less-plugin-autoprefix</p>
            <h2 id="emmet-插件"><a href="#emmet-插件" class="headerlink" title="emmet 插件"></a>emmet 插件</h2>
            <p>emmet 插件 安装<br>Ctrl + Shift + P、pcip、emmet<br>Ctrl + Shift + P、pcip、emmet css snippets</p>
            <table>
              <thead>
                <tr>
                  <th>-</th>
                  <th>-</th>
                  <th>-</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td>快速生成简单页面</td>
                  <td>!，Ctrl + E</td>
                  <td>该方法是emmet快捷键，分两步完成</td>
                </tr>
                <tr>
                  <td><img src="" data-original="/images/FrontEnd/0007.png" alt="0007"></td>
                  <td>ul&gt;.item$*10 &gt;</td>
                  <td>：子元素选择符.item：<br>子元素是item开头$：<br>代表序号*10：<br>输入10个带有class=”item123….10”</td>
                </tr>
                <tr>
                  <td></td>
                  <td>扩展，很酷</td>
                  <td>div#s.d&gt;div#e.s&gt;span.em*5&gt;span.im$*5</td>
                </tr>
              </tbody>
            </table>
            <p><a target="_blank" rel="noopener" href="http://emmet.io/">http://emmet.io/</a><br><a target="_blank" rel="noopener" href="https://github.com/sergeche/emmet-sublime">https://github.com/sergeche/emmet-sublime</a><br><a target="_blank" rel="noopener" href="https://github.com/sergeche/emmet-sublime#tab-key-handler">https://github.com/sergeche/emmet-sublime#tab-key-handler</a></p>

          </div>





          <footer class="post-footer">
            <div class="post-tags">
              <a href="/tags/IDE/" rel="tag"># IDE</a>
              <a href="/tags/Sublime/" rel="tag"># Sublime</a>
              <a href="/tags/%E5%B7%A5%E5%85%B7/" rel="tag"># 工具</a>
            </div>



            <div class="post-nav">
              <div class="post-nav-item">
                <a href="/blob/2016-03-16-ide-sublime-shortcut-key/" rel="prev" title="IDE-Sublime 快捷键">
                  <i class="fa fa-chevron-left"></i> IDE-Sublime 快捷键
                </a>
              </div>
              <div class="post-nav-item">
                <a href="/blob/2016-04-01-ide-sublime-configuration-node.js-development-environment/" rel="next" title="IDE-Sublime 配置Node.js开发环境">
                  IDE-Sublime 配置Node.js开发环境 <i class="fa fa-chevron-right"></i>
                </a>
              </div>
            </div>
          </footer>
        </article>
      </div>







      <script>
        window.addEventListener('tabs:register', () => {
          let {
            activeClass
          } = CONFIG.comments;
          if (CONFIG.comments.storage) {
            activeClass = localStorage.getItem('comments_active') || activeClass;
          }
          if (activeClass) {
            const activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
            if (activeTab) {
              activeTab.click();
            }
          }
        });
        if (CONFIG.comments.storage) {
          window.addEventListener('tabs:click', event => {
            if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
            const commentClass = event.target.classList[1];
            localStorage.setItem('comments_active', commentClass);
          });
        }
      </script>
    </div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


      <div class="copyright">
        &copy;
        <span itemprop="copyrightYear">2021</span>
        <span class="with-love">
          <i class="fa fa-heart"></i>
        </span>
        <span class="author" itemprop="copyrightHolder">holidaypenguin</span>
      </div>
      <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/mist/" class="theme-link" rel="noopener" target="_blank">NexT.Mist</a> 强力驱动
      </div>

    </div>
  </footer>


  <script size="300" alpha="0.1" zIndex="-1" src="https://cdn.jsdelivr.net/npm/ribbon.js@1.0.2/dist/ribbon.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/animejs@3.2.1/lib/anime.min.js"></script>
  <script src="/js/love.js"></script>

  <script src="/js/development.js"></script>
  <script src="/js/utils.js"></script>
  <script src="/js/motion.js"></script>
  <script src="/js/schemes/muse.js"></script>
  <script src="/js/next-boot.js"></script>


  <script src="/js/local-search.js"></script>









  <script>
    (function() {
      function leancloudSelector(url) {
        url = encodeURI(url);
        return document.getElementById(url).querySelector('.leancloud-visitors-count');
      }

      function addCount(Counter) {
        const visitors = document.querySelector('.leancloud_visitors');
        const url = decodeURI(visitors.id);
        const title = visitors.dataset.flagTitle;

        Counter('get', '/classes/Counter?where=' + encodeURIComponent(JSON.stringify({
            url
          })))
          .then(response => response.json())
          .then(({
            results
          }) => {
            if (results.length > 0) {
              const counter = results[0];
              leancloudSelector(url).innerText = counter.time + 1;
              Counter('put', '/classes/Counter/' + counter.objectId, {
                  time: {
                    '__op': 'Increment',
                    'amount': 1
                  }
                })
                .catch(error => {
                  console.error('Failed to save visitor count', error);
                });
            } else {
              Counter('post', '/classes/Counter', {
                  title,
                  url,
                  time: 1
                })
                .then(response => response.json())
                .then(() => {
                  leancloudSelector(url).innerText = 1;
                })
                .catch(error => {
                  console.error('Failed to create', error);
                });
            }
          })
          .catch(error => {
            console.error('LeanCloud Counter Error', error);
          });
      }

      function showTime(Counter) {
        const visitors = document.querySelectorAll('.leancloud_visitors');
        const entries = [...visitors].map(element => {
          return decodeURI(element.id);
        });

        Counter('get', '/classes/Counter?where=' + encodeURIComponent(JSON.stringify({
            url: {
              '$in': entries
            }
          })))
          .then(response => response.json())
          .then(({
            results
          }) => {
            for (let url of entries) {
              const target = results.find(item => item.url === url);
              leancloudSelector(url).innerText = target ? target.time : 0;
            }
          })
          .catch(error => {
            console.error('LeanCloud Counter Error', error);
          });
      }

      const {
        app_id,
        app_key,
        server_url
      } = {
        "enable": true,
        "app_id": "povuqNsSqFodlakVIwtEX5kb-gzGzoHsz",
        "app_key": "zXD40RDtDB3DMtpC89k0AK7g",
        "server_url": null,
        "security": false
      };

      function fetchData(api_server) {
        const Counter = (method, url, data) => {
          return fetch(`${api_server}/1.1${url}`, {
            method,
            headers: {
              'X-LC-Id': app_id,
              'X-LC-Key': app_key,
              'Content-Type': 'application/json',
            },
            body: JSON.stringify(data)
          });
        };
        if (CONFIG.page.isPost) {
          if (CONFIG.hostname !== location.hostname) return;
          addCount(Counter);
        } else if (document.querySelectorAll('.post-title-link').length >= 1) {
          showTime(Counter);
        }
      }

      const api_server = app_id.slice(-9) === '-MdYXbMMI' ? `https://${app_id.slice(0, 8).toLowerCase()}.api.lncldglobal.com` : server_url;

      if (api_server) {
        fetchData(api_server);
      } else {
        fetch('https://app-router.leancloud.cn/2/route?appId=' + app_id)
          .then(response => response.json())
          .then(({
            api_server
          }) => {
            fetchData('https://' + api_server);
          });
      }
    })();
  </script>



<script>
            window.imageLazyLoadSetting = {
                isSPA: false,
                preloadRatio: 1,
                processImages: null,
            };
        </script><script>window.addEventListener("load",function(){var t=/\.(gif|jpg|jpeg|tiff|png)$/i,r=/^data:image\/[a-z]+;base64,/;Array.prototype.slice.call(document.querySelectorAll("img[data-original]")).forEach(function(a){var e=a.parentNode;"A"===e.tagName&&(e.href.match(t)||e.href.match(r))&&(e.href=a.dataset.original)})});</script><script>!function(n){n.imageLazyLoadSetting.processImages=o;var e=n.imageLazyLoadSetting.isSPA,i=n.imageLazyLoadSetting.preloadRatio||1,r=Array.prototype.slice.call(document.querySelectorAll("img[data-original]"));function o(){e&&(r=Array.prototype.slice.call(document.querySelectorAll("img[data-original]")));for(var t,a=0;a<r.length;a++)0<=(t=(t=r[a]).getBoundingClientRect()).bottom&&0<=t.left&&t.top<=(n.innerHeight*i||document.documentElement.clientHeight*i)&&function(){var t,e,n,i,o=r[a];t=o,e=function(){r=r.filter(function(t){return o!==t})},n=new Image,i=t.getAttribute("data-original"),n.onload=function(){t.src=i,e&&e()},t.src!==i&&(n.src=i)}()}o(),n.addEventListener("scroll",function(){var t,e;t=o,e=n,clearTimeout(t.tId),t.tId=setTimeout(function(){t.call(e)},500)})}(this);</script></body>

</html>